Skip to main content
function
required
The function to hook.
function
required
The function to call instead.
Aliases: hookfunc replaceclosure

Example

This example hooks the print function and replaces it with a warning if the content is “Hello, world!”.